package com.jron.cqiu.kernel.scheduler;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.jron.cqiu.kernel.mail.IMailOrder;

/**
 * Created by Intellij IDEA.
 *
 * @Author: Yejw
 * @Date: 2008-6-18
 * @Time: 9:21:36
 */
public class MailOrderScheduler implements Job {

    /**
     * <p>
     * Called by the <code>{@link org.quartz.Scheduler}</code> when a <code>
     * {@link org.quartz.Trigger}</code>
     * fires that is associated with the <code>Job</code>.
     * </p>
     * <p/>
     * <p>
     * The implementation may wish to set a
     * {@link org.quartz.JobExecutionContext#setResult(Object) result} object on the
     * {@link org.quartz.JobExecutionContext} before this method exits.
     *  The result itself is meaningless to Quartz, but may be informative to
     * <code>{@link org.quartz.JobListener}s</code> or
     * <code>{@link org.quartz.TriggerListener}s</code> that are watching the job's
     * execution.
     * </p>
     *
     * @throws org.quartz.JobExecutionException
     *          if there is an exception while executing the job.
     */
    public void execute(JobExecutionContext context) throws JobExecutionException {
        IMailOrder.INSTANCE.execMailOrder();
    }
}
